import request from '@/config/axios'

// 项目需求与V&V状态关联表单 VO
export interface RequireVvStatusAssociationVO {
  id: number // 自增主键
  requirementId: string // 关联需求编号
  vvStatus: string // 需求验证状态
  vvTime: Date // 验证操作时间
  vvExecutor: string // 验证操作用户
}

// 项目需求与V&V状态关联表单 API
export const RequireVvStatusAssociationApi = {
  // 查询项目需求与V&V状态关联表单分页
  getRequireVvStatusAssociationPage: async (params: any) => {
    return await request.get({ url: `/project/require-vv-status-association/page`, params })
  },

  // 查询项目需求与V&V状态关联表单详情
  getRequireVvStatusAssociation: async (id: number) => {
    return await request.get({ url: `/project/require-vv-status-association/get?id=` + id })
  },

  // 新增项目需求与V&V状态关联表单
  createRequireVvStatusAssociation: async (data: RequireVvStatusAssociationVO) => {
    return await request.post({ url: `/project/require-vv-status-association/create`, data })
  },

  // 修改项目需求与V&V状态关联表单
  updateRequireVvStatusAssociation: async (data: RequireVvStatusAssociationVO) => {
    return await request.put({ url: `/project/require-vv-status-association/update`, data })
  },

  // 删除项目需求与V&V状态关联表单
  deleteRequireVvStatusAssociation: async (id: number) => {
    return await request.delete({ url: `/project/require-vv-status-association/delete?id=` + id })
  },

  // 导出项目需求与V&V状态关联表单 Excel
  exportRequireVvStatusAssociation: async (params) => {
    return await request.download({ url: `/project/require-vv-status-association/export-excel`, params })
  },
}